package com.livedocumentation.client.model;

public class ProjectClass extends Feature implements
		Comparable<ProjectClass> {

	private String className;

	private String classPackage;

	private String modifiers;

	private String superclass;

	private String[] imports;

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public String getClassPackage() {
		return classPackage;
	}

	public void setClassPackage(String classPackage) {
		this.classPackage = classPackage;
	}

	public String getModifiers() {
		return modifiers;
	}

	public void setModifiers(String modifiers) {
		this.modifiers = modifiers;
	}

	public String getSuperclass() {
		return superclass;
	}

	public void setSuperclass(String superclass) {
		this.superclass = superclass;
	}

	public String[] getImports() {
		return imports;
	}

	public void setImports(String[] imports) {
		this.imports = imports;
	}

	@Override
	public String toString() {

		String filePath = this.className;

		if (this.classPackage != null && this.classPackage.length() > 0) {

			filePath = this.classPackage + "." + this.className;

		}

		return filePath;
	}

	@Override
	public int compareTo(ProjectClass that) {

		String thisClass = this.classPackage + "." + this.className;
		String thatClass = that.classPackage + "." + that.className;

		return thisClass.compareTo(thatClass);
	}

}
